#!/bin/bash
dir=$1
start=$2
end=$3
prefix=$4
echo -n $dir " "
# cd $dir
# git branch -a | grep "origin" | grep -v "HEAD" | sed -r "s/remotes\/origin\///g" | xargs -n1 -i{} git checkout {}
# cd ..
# git remote -v

#git log --since="$start" --before="$end" --author="304554815@qq.com" --pretty=tformat: --numstat | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "addedLines: %s removedLines : %s totalLines: %s\n",add,subs,loc }'

#git log --since="$start" --before="$end" --author="304554815@qq.com" \
#--pretty=tformat: --numstat  -- . ":(exclude)XsNet/include" ":(exclude)**/boost" ":(exclude)**/kaldi" ":(exclude)**/bin" ":(exclude)**/lib" | gawk \
#'{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "addedLines: %s removedLines : %s totalLines: %s\n",add,subs,loc }'

python3 dealRepo.py "$1" "${4}@${1}" "$2" "$3"
